//@ts-nocheck

// console.log("WOOP WOOP", Promise);
// console.log("WOOP WOOP", setTimeout)
//  console.log("WOOP WOOP", this)
// console.log("WOOP WOOP", global)

var TTT = this;

addEventListener("DOMContentLoaded", function (aEvent) {
    aEvent.originalTarget.addEventListener("framescript:log", function (aEvent) {
        sendAsyncMessage("webview:action", aEvent.detail);
    });
    // function sendPipe() {
    //     var customEvent = new CustomEvent("framescript:log", {
    //         detail: {
    //             response: "response",
    //             caller: "caller"
    //         }
    //     });
    //     document.dispatchEvent(customEvent);
    // }


    sendAsyncMessage("webview:action", {
        check1: typeof this.setTimeout,
        check2: typeof this.Promise,
        check3: typeof this.querySelector,
        check4: typeof this.addEventListener,
        check5: typeof aEvent.originalTarget.addEventListener,
        check6: typeof aEvent.originalTarget.querySelector,
        check7: typeof aEvent.originalTarget.querySelector("body"),
        check8: typeof aEvent.originalTarget.domain,
        check9: JSON.stringify(aEvent),
        check10: typeof TTT,
        check11: JSON.stringify(TTT),
        check12: typeof Qt
    });
});





